package com.initializer;

import com.servlet.ServeletC;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.servlet.DispatcherServlet;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;

/**
 * Created by pengfei on 2017/10/10.
 */
public class MyWebApplicationInitializer implements WebApplicationInitializer {
    public void onStartup(ServletContext servletContext) throws ServletException {
        ServletRegistration.Dynamic registration  = servletContext.addServlet("c",new ServeletC());
        registration.addMapping(new String[]{"/c"});

    }
}
